package MAgentAssignment;

import MAgentAssignment.ontology.FlightOntology;
import jade.content.lang.Codec;
import jade.content.lang.sl.SLCodec;
import jade.content.onto.Ontology;
import jade.core.Agent;
import jade.core.behaviours.CyclicBehaviour;

/**
 * Created by IntelliJ IDEA.
 * User: prageeth
 * Date: 2/16/12
 * Time: 2:28 PM
 * To change this template use File | Settings | File Templates.
 */
public class AirplaneAgent  extends Agent
{
     private Codec codec = new SLCodec();
    private Ontology ontology = FlightOntology.getInstance();

    @Override protected void setup()
    {

        getContentManager().registerLanguage( codec );
        getContentManager().registerOntology( ontology );

        addBehaviour( new CyclicBehaviour()
        {
            @Override public void action()
            {
                // check faults
                // if found ask pilot agent to land immediately
                // once landed correct the planes and waits for airline managers queries
                // provide information if airline manager want to create new flights with the landed flights.
            }
        } );
    }
}
